Optimal. Leaf size=393 \[ \frac{\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} a^3 d}-\frac{\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B) \tan ^{-1}\left (\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{15 (-2 B+5 i A)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{((77+75 i) A-(30-28 i) B) \log \left (\tan (c+d x)-\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{32 \sqrt{2} a^3 d}-\frac{\left (\frac{1}{32}-\frac{i}{32}\right ) ((1+76 i) A-(29+i) B) \log \left (\tan (c+d x)+\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.860597, antiderivative size = 393, normalized size of antiderivative = 1., number of steps used = 15, number of rules used = 9, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3596, 3529, 3534, 1168, 1162, 617, 204, 1165, 628} \[ \frac{\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} a^3 d}-\frac{\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B) \tan ^{-1}\left (\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{15 (-2 B+5 i A)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{((77+75 i) A-(30-28 i) B) \log \left (\tan (c+d x)-\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{32 \sqrt{2} a^3 d}-\frac{\left (\frac{1}{32}-\frac{i}{32}\right ) ((1+76 i) A-(29+i) B) \log \left (\tan (c+d x)+\sqrt{2} \sqrt{\tan (c+d x)}+1\right )}{\sqrt{2} a^3 d}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3596
Rule 3529
Rule 3534
Rule 1168
Rule 1162
Rule 617
Rule 204
Rule 1165
Rule 628
Rubi steps
\begin{align*} \int \frac{A+B \tan (c+d x)}{\tan ^{\frac{5}{2}}(c+d x) (a+i a \tan (c+d x))^3} \, dx &=\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{\int \frac{\frac{3}{2} a (5 A+i B)-\frac{9}{2} a (i A-B) \tan (c+d x)}{\tan ^{\frac{5}{2}}(c+d x) (a+i a \tan (c+d x))^2} \, dx}{6 a^2}\\ &=\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{\int \frac{3 a^2 (16 A+5 i B)-21 a^2 (2 i A-B) \tan (c+d x)}{\tan ^{\frac{5}{2}}(c+d x) (a+i a \tan (c+d x))} \, dx}{24 a^4}\\ &=\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{\int \frac{21 a^3 (11 A+4 i B)-45 a^3 (5 i A-2 B) \tan (c+d x)}{\tan ^{\frac{5}{2}}(c+d x)} \, dx}{48 a^6}\\ &=-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{\int \frac{-45 a^3 (5 i A-2 B)-21 a^3 (11 A+4 i B) \tan (c+d x)}{\tan ^{\frac{3}{2}}(c+d x)} \, dx}{48 a^6}\\ &=-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{15 (5 i A-2 B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{\int \frac{-21 a^3 (11 A+4 i B)+45 a^3 (5 i A-2 B) \tan (c+d x)}{\sqrt{\tan (c+d x)}} \, dx}{48 a^6}\\ &=-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{15 (5 i A-2 B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{-21 a^3 (11 A+4 i B)+45 a^3 (5 i A-2 B) x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{24 a^6 d}\\ &=-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{15 (5 i A-2 B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{((77+75 i) A-(30-28 i) B) \operatorname{Subst}\left (\int \frac{1-x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{16 a^3 d}+-\frac{\left (\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B)\right ) \operatorname{Subst}\left (\int \frac{1+x^2}{1+x^4} \, dx,x,\sqrt{\tan (c+d x)}\right )}{a^3 d}\\ &=-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{15 (5 i A-2 B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{((77+75 i) A-(30-28 i) B) \operatorname{Subst}\left (\int \frac{\sqrt{2}+2 x}{-1-\sqrt{2} x-x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{32 \sqrt{2} a^3 d}+\frac{((77+75 i) A-(30-28 i) B) \operatorname{Subst}\left (\int \frac{\sqrt{2}-2 x}{-1+\sqrt{2} x-x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{32 \sqrt{2} a^3 d}+-\frac{\left (\left (\frac{1}{32}-\frac{i}{32}\right ) ((76+i) A+(1+29 i) B)\right ) \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{2} x+x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{a^3 d}+-\frac{\left (\left (\frac{1}{32}-\frac{i}{32}\right ) ((76+i) A+(1+29 i) B)\right ) \operatorname{Subst}\left (\int \frac{1}{1+\sqrt{2} x+x^2} \, dx,x,\sqrt{\tan (c+d x)}\right )}{a^3 d}\\ &=\frac{((77+75 i) A-(30-28 i) B) \log \left (1-\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{32 \sqrt{2} a^3 d}-\frac{((77+75 i) A-(30-28 i) B) \log \left (1+\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{32 \sqrt{2} a^3 d}-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{15 (5 i A-2 B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}+-\frac{\left (\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B)\right ) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} a^3 d}+\frac{\left (\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B)\right ) \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} a^3 d}\\ &=\frac{\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B) \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} a^3 d}-\frac{\left (\frac{1}{16}-\frac{i}{16}\right ) ((76+i) A+(1+29 i) B) \tan ^{-1}\left (1+\sqrt{2} \sqrt{\tan (c+d x)}\right )}{\sqrt{2} a^3 d}+\frac{((77+75 i) A-(30-28 i) B) \log \left (1-\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{32 \sqrt{2} a^3 d}-\frac{((77+75 i) A-(30-28 i) B) \log \left (1+\sqrt{2} \sqrt{\tan (c+d x)}+\tan (c+d x)\right )}{32 \sqrt{2} a^3 d}-\frac{7 (11 A+4 i B)}{24 a^3 d \tan ^{\frac{3}{2}}(c+d x)}+\frac{15 (5 i A-2 B)}{8 a^3 d \sqrt{\tan (c+d x)}}+\frac{A+i B}{6 d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^3}+\frac{2 A+i B}{4 a d \tan ^{\frac{3}{2}}(c+d x) (a+i a \tan (c+d x))^2}+\frac{3 (5 A+2 i B)}{8 d \tan ^{\frac{3}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}\\ \end{align*}
Mathematica [A] time = 4.01906, size = 306, normalized size = 0.78 \[ \frac{\sec ^2(c+d x) (\cos (d x)+i \sin (d x))^3 (A+B \tan (c+d x)) \left (\frac{1}{3} \csc (c+d x) (\cos (3 d x)-i \sin (3 d x)) (-2 (241 A+90 i B) \cos (2 (c+d x))+(349 A+147 i B) \cos (4 (c+d x))-502 i A \sin (2 (c+d x))+347 i A \sin (4 (c+d x))+69 A+194 B \sin (2 (c+d x))-145 B \sin (4 (c+d x))+33 i B)+(1-i) (\cos (3 c)+i \sin (3 c)) \sqrt{\sin (2 (c+d x))} \sec (c+d x) \left (((76+i) A+(1+29 i) B) \sin ^{-1}(\cos (c+d x)-\sin (c+d x))+((29+i) B-(1+76 i) A) \log \left (\sin (c+d x)+\sqrt{\sin (2 (c+d x))}+\cos (c+d x)\right )\right )\right )}{32 d \sqrt{\tan (c+d x)} (a+i a \tan (c+d x))^3 (A \cos (c+d x)+B \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.062, size = 403, normalized size = 1. \begin{align*}{\frac{{\frac{27\,i}{8}}A}{{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{{\frac{5}{2}}}}-{\frac{7\,B}{4\,{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{{\frac{5}{2}}}}+{\frac{91\,A}{12\,{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{{\frac{3}{2}}}}+{\frac{{\frac{49\,i}{12}}B}{{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}} \left ( \tan \left ( dx+c \right ) \right ) ^{{\frac{3}{2}}}}+{\frac{5\,B}{2\,{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}}\sqrt{\tan \left ( dx+c \right ) }}-{\frac{{\frac{35\,i}{8}}A}{{a}^{3}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{3}}\sqrt{\tan \left ( dx+c \right ) }}-{\frac{29\,B}{4\,{a}^{3}d \left ( \sqrt{2}-i\sqrt{2} \right ) }\arctan \left ( 2\,{\frac{\sqrt{\tan \left ( dx+c \right ) }}{\sqrt{2}-i\sqrt{2}}} \right ) }+{\frac{19\,iA}{{a}^{3}d \left ( \sqrt{2}-i\sqrt{2} \right ) }\arctan \left ( 2\,{\frac{\sqrt{\tan \left ( dx+c \right ) }}{\sqrt{2}-i\sqrt{2}}} \right ) }-{\frac{{\frac{i}{4}}A}{{a}^{3}d \left ( \sqrt{2}+i\sqrt{2} \right ) }\arctan \left ( 2\,{\frac{\sqrt{\tan \left ( dx+c \right ) }}{\sqrt{2}+i\sqrt{2}}} \right ) }-{\frac{B}{4\,{a}^{3}d \left ( \sqrt{2}+i\sqrt{2} \right ) }\arctan \left ( 2\,{\frac{\sqrt{\tan \left ( dx+c \right ) }}{\sqrt{2}+i\sqrt{2}}} \right ) }+{\frac{6\,iA}{{a}^{3}d}{\frac{1}{\sqrt{\tan \left ( dx+c \right ) }}}}-2\,{\frac{B}{{a}^{3}d\sqrt{\tan \left ( dx+c \right ) }}}-{\frac{2\,A}{3\,{a}^{3}d} \left ( \tan \left ( dx+c \right ) \right ) ^{-{\frac{3}{2}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.29068, size = 2407, normalized size = 6.12 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.22248, size = 246, normalized size = 0.63 \begin{align*} \frac{\left (i - 1\right ) \, \sqrt{2}{\left (i \, A + B\right )} \arctan \left (-\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{2} \sqrt{\tan \left (d x + c\right )}\right )}{16 \, a^{3} d} - \frac{\left (i - 1\right ) \, \sqrt{2}{\left (76 \, A + 29 i \, B\right )} \arctan \left (-\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{2} \sqrt{\tan \left (d x + c\right )}\right )}{16 \, a^{3} d} - \frac{225 \, A \tan \left (d x + c\right )^{4} + 90 i \, B \tan \left (d x + c\right )^{4} - 598 i \, A \tan \left (d x + c\right )^{3} + 242 \, B \tan \left (d x + c\right )^{3} - 489 \, A \tan \left (d x + c\right )^{2} - 204 i \, B \tan \left (d x + c\right )^{2} + 96 i \, A \tan \left (d x + c\right ) - 48 \, B \tan \left (d x + c\right ) - 16 \, A}{24 \,{\left (-i \, \tan \left (d x + c\right )^{\frac{3}{2}} - \sqrt{\tan \left (d x + c\right )}\right )}^{3} a^{3} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]